#ifndef _MYTASK_H
#define _MYTASK_H

#include "14_MessageHandler.hpp"
#include <time.h>
#include <unistd.h>     // unix standard
#include <stdlib.h>
#include <stdio.h>

#define info_msg(msg) do { \
    printf("%s | %d | %s | %s \n", __FILE__, __LINE__, __FUNCTION__, msg); \
} while(0)

namespace xy
{

class Mytask
:public MessageHandler
{
public:
     std::string handle(const std::string& msg) override
     {
        srand(time(nullptr));
        int value = rand() % 1000;
        
        char buff[64] = {0};
        snprintf(buff, sizeof(buff), "MyTask_echo | input num = %d \n",value);         
        info_msg(buff);
        
        return buff;
     };
private:

};

}


#endif
